#!/usr/bin/env groovy
import static java.lang.System.*
import static java.util.Date.*
import static javax.swing.JOptionPane.*

try{
    new AntBuilder().tar(
        //basedir:getProperty("user.home") + "/.jedit",
        destfile:getProperty("user.home") + "/Desktop/jedit-settings.tar.bz2", 
        compression:"bzip2",
    ){
        fileset(dir:getProperty("user.home") + "/.jedit"){
            exclude(name:"**/.svn/**")
            exclude(name:"backup/**")
            exclude(name:"jars/**")
            exclude(name:"jars-cache/**")
            exclude(name:"**/*.log")
        }
    }
    
    showMessageDialog(view, "complete!")
} catch (e) {
    showMessageDialog(view, e.toString())
}
